﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebBookingApplication.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="<%= ResolveClientUrl("~/scripts/jquery-1.7.1.js") %>"></script>
    <script type="text/javascript" src="<%= ResolveClientUrl("~/scripts/jquery.signalR.js") %>"></script>
    <script type="text/javascript" src="<%= ResolveClientUrl("~/signalr/hubs") %>"></script>
    <script type="text/javascript">
        $(function () {
            var bookingHub = $.connection.bookingHub;



            $("#bookButton").click(function () {
                bookingHub.bookFlight("fco", "jfk");
            });


            bookingHub.displayMessage = function (message) {
                $("#msg").html(message);
            };

            $.connection.hub.start();
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="button" id="bookButton" value="Book flight" />
        <br />
        <b>Status:</b>&nbsp;&nbsp;&nbsp;<span id="msg"></span>
        <hr />
    </div>
    </form>
</body>
</html>
